package com.qingcloud.base.constant;

public interface SystemConstant {

    ////////////////////前端请求相关常量///////////////////////////
    /**
     * 请求成功返回码
     */
    public final static Integer SUCCESS = 2000;
    /**
     * 需要确认提示返回码
     */
    public final static Integer CONFIRM_CODE = 2001;
    /**
     * 未登录返回码
     */
    public final static Integer NOT_LOGIN = 6000;
    /**
     * 请求失败返回码
     */
    public final static Integer FAILURE = 3000;
    /**
     * 请求验证失败返回码
     */
    public final static Integer PART_SUCCESS = 4000;

    ////////////////////前端请求相关常量结束///////////////////////////

    /** 登录用户Token令牌缓存KEY前缀 */
    public static final String PREFIX_USER_TOKEN  = "user_token_%s";
    /** Token缓存时间：3600秒即一小时 */
    public static final int  TOKEN_EXPIRE_TIME  = 10*60;

    public final static String X_ACCESS_TOKEN = "X-Access-Token";
    public final static String X_SIGN = "X-Sign";
    public final static String X_TIMESTAMP = "X-TIMESTAMP";
    public final static String TOKEN_IS_INVALID_MSG = "Token失效，请重新登录!";


    /////////////////////用户账号//////////////
    /** 0未激活*/
    public static final int COMMON_ACCOUINT_ANACTIVE=0;
    /** 1登录中*/
    public static final int COMMON_ACCOUINT_LOGINING=1;
    /** 退出*/
    public static final int COMMON_ACCOUINT_QUIT=2;
    /** 锁定 */
    public static final int COMMON_ACCOUINT_LOCK=3;
    /** 禁用*/
    public static final int COMMON_ACCOUINT_FORBIDDEN=4;
    /////////////////////END///////////////////////////


    /////////////////公共日期格式////////////////////////////////
    String MONTH_FORMAT = "yyyy-MM";
    String DATE_FORMAT = "yyyy-MM-dd";
    String DATETIME_FORMAT = "yyyy-MM-dd HH:mm:ss";
    String SIMPLE_MONTH_FORMAT = "yyyyMM";
    String SIMPLE_DATE_FORMAT = "yyyyMMdd";
    String SIMPLE_DATETIME_FORMAT = "yyyyMMddHHmmss";
    String TIME_ZONE_GMT8 = "GMT+8";
    /////////////////////////////////////////////////////

    ///////////////////////////////////
    /**
     * 项目版本号(banner使用)
     */
    String PROJECT_VERSION = "1.2.0";

    /**
     * token请求头名称
     */
    String TOKEN_HEADER = "Authorization";

    /**
     * The access token issued by the authorization server. This value is REQUIRED.
     */
    String ACCESS_TOKEN = "access_token";

    String BEARER_TYPE = "Bearer";

    /**
     * 标签 header key
     */
    String HEADER_LABEL = "x-label";

    /**
     * 标签 header 分隔符
     */
    String HEADER_LABEL_SPLIT = ",";

    /**
     * 标签或 名称
     */
    String LABEL_OR = "labelOr";

    /**
     * 标签且 名称
     */
    String LABEL_AND = "labelAnd";

    /**
     * 权重key
     */
    String WEIGHT_KEY = "weight";

    /**
     * 删除
     */
    String STATUS_DEL = "1";

    /**
     * 正常
     */
    String STATUS_NORMAL = "0";

    /**
     * 锁定
     */
    String STATUS_LOCK = "9";

    /**
     * 目录
     */
    Integer CATALOG = -1;


    /**
     * 删除标记
     */
    String DEL_FLAG = "is_del";

    /**
     * 超级管理员用户名
     */

    String LOCK_KEY_PREFIX = "LOCK_KEY";

    /**
     * 租户id参数
     */
    String TENANT_ID_PARAM = "tenantId";


    /**
     * 日志链路追踪id信息头
     */
    String TRACE_ID_HEADER = "x-traceId-header";
    /**
     * 日志链路追踪id日志标志
     */
    String LOG_TRACE_ID = "traceId";

    /**
     * 注册中心元数据 版本号
     */
    String METADATA_VERSION = "version";

    /**
     * 文件分隔符
     */
    String PATH_SPLIT = "/";


    /**
     * RPC API 的前缀
     */
    public static final String RPC_API_PREFIX = "/rpc-api";


    /**
     * String objectName= "jobconfig/"+env+"/" + configFolder + "/" + componentInstance.getSoftwareName() + ".zip";
     */
    public static final String JOB_CONFIG_OBJECTNAME = "jobconfig/%s/%s/%s.zip";
}
